<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新闻广告--管理后台</title>
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    $(function(){
        initTopic();
    });
    //加载主题
    function initTopic(){
        $.getJSON("/adver.do",{"opr":"getAll"},function(data){
            $(".classlist").empty();
            $(data).each(function(i,adver){
                $(".classlist").append(
                    "<li> " +
                        "&#160;&#160;&#160;&#160; "+adver.aname+ "&#160;&#160;&#160;&#160;\n" +
                    "</li>")
            })
        })
    }

</script>
</head>
<body>
<div id="header">
  <div id="welcome">
    欢迎使用新闻管理系统!</div>
  <div id="nav">
    <div id="logo"><img src="../images/logo.jpg" alt="新闻中国" /></div>
    <div id="a_b01"><img src="../images/a_b01.gif" alt="" /></div>
  </div>
</div>
<div id="admin_bar">
  <div id="status">管理员： 登录  &#160;&#160;&#160;&#160; <a href="#">login out</a></div>
  <div id="channel"> </div>
</div>
<div id="main">
  <%@ include file="console_element/left.html" %>
  <div id="opt_area">

    <ul class="classlist">
     <c:forEach items="${sessionScope.adverList}" var="adver">
      <li> &#160;&#160;&#160;&#160; ${adver.aname} &#160;&#160;&#160;&#160;
      </li>
     </c:forEach>
    </ul>
      <p id="info"></p>
  </div>
</div>
<div id="footer">
  <%@ include file="console_element/bottom.html" %>
</div>
</body>
</html>
